package com.listplayer;

import java.io.File;
import java.io.FileFilter;

public class AudioFilesFilter implements FileFilter
{

	@Override
	public boolean accept(File pathname)
	{
		if( pathname.isDirectory())
			return true;
		
		String[] musicExt = { "mp3", "wav", "wma" };
		
		for (String ext : musicExt)
		{
			if ( pathname.getName().toLowerCase().endsWith("." + ext))
			{
				return true;
			}
		}
		
		return false;
	}
	
}
